1. Field of the Invention
The present invention relates to an on-vehicle electronic controller including a microprocessor used for controlling fuel supply of a vehicle engine, and particularly concerns an on-vehicle electronic controller which is improved in handling a number of input/output signals to miniaturize the controller and is improved to standardize the controller regarding the control on various kinds of vehicles.
2. Description of the Prior Art
FIG. 8 is a typical block circuit diagram showing a conventional one of such electronic controllers, in which an ECU (engine control unit) 1 composed of a single printed board includes a large LSI (integrated circuit component) 2 as a main component. In the LSI 2, a CPU (microprocessor) 3, a nonvolatile flash memory 4, a RAM memory 5, an input data selector 6, an A/D converter 7, an output latch memory 8 and so on are connected via a data bus 30.
The ECU 1 operates in response to control power supplied from a power supply unit 9, which is fed from an on-vehicle battery 10 via a power supply line 11 and a power supply switch 12. An execution program, a control constant for controlling an engine, and soon are stored in the nonvolatile flash memory 4 in advance.
Meanwhile, a number of ON/OFF input signals from sensor switches 13 are supplied from bleeder resistors 14, which serve as pull-up or pull-down resistors, to comparators 19 via series resistors 15 and parallel capacitors 16 that constitute noise filters. Input resistors 17 and reaction resistors 18 are connected to the comparators 19. When a voltage across the parallel capacitor 16 exceeds a reference voltage applied to a negative terminal of the comparator 19, a signal of logic xe2x80x9cHxe2x80x9d is supplied to the data selector 6.
However, when a voltage across the parallel capacitor 16 decreases, the input from the reaction resistor 18 is added thereto. Thus, the output of the comparator 19 recovers to logic xe2x80x9cLxe2x80x9d since a voltage across the parallel capacitor 16 decreases to less than a reference voltage of the comparator 19.
As described above, the comparator 19 acts as a level judging comparator having a hysteresis function. A number of outputs from the comparators 19 are stored in the RAM memory 5 via the data selector 6 and the data bus 30.
Additionally, for example, the data selector 6 handles an input of 16 bits and outputs the input to the data bus 30 when receiving a chip select signal from the CPU3. Input points range over several tens points and a plurality of data selectors are used.
Further, a number of analog signals from the analog sensors 20 are supplied to the A/D converters 7 via the series resistors 21 and the parallel capacitors 22 that constitute noise filters. Digital outputs from the A/D converters, which receive chip select signals from the CPU3, are stored in the RAM memory 5 via the data bus 30.
The control output of the CPU3 is stored in the latch memory 8 via the data bus 30 and drives external loads 26 via output transistors 23. A plurality of latch memories is used for a number of control output points, and the control output is stored in the latch memory chip-selected by the CPU3.
Additionally, reference numeral 24 denotes driving base resistors of the transistors 23, reference numeral 25 denotes stable resistors, each connecting base/emitter terminals of the transistor 23, and reference numeral 27 denotes a feeding power supply relay for the external load 26.
A conventional device configured thus is disadvantageous as follows: the LSI 2 is large in size because the CPU 3 handles quite a large number of inputs and outputs, the parallel capacitors 16 and 22 acting as noise filters require capacitors having a variety of capacities in order to obtain a desired filter constant, causing difficulty in standardization, and a large capacitor is needed to obtain a large filter constant, increasing the ECU 1 in size.
As a measure for reducing the input/output terminals of the LSI 2 to miniaturize the LSI 2, for example, Japanese Patent Laid-Open No. 7-13912 specification xe2x80x9cINPUT/OUTPUT PROCESSING ICxe2x80x9d discloses a method of time-sharing and transferring a number of input/output signals using a serial communication block.
However, this method requires noise filters with a variety of capacities and is not suitable for standardization of the device. Besides, a capacitor demands a large capacity to obtain a sufficient filter constant and is not suitable for miniaturization of the device.
Meanwhile, a concept has been known in which a digital filter is used as a noise filter for ON/OFF input signals and the filter constant is controlled by a microprocessor.
For instance, in xe2x80x9cPROGRAMMABLE CONTROLLERxe2x80x9d disclosed in Japanese Patent Laid-Open No. 5-119811 specification, when an input logic value of an external input signal subjected to sampling is successively set at the same value for more than one time, the signal is adopted and stored in an input image memory, and a filter constant changing command is provided for changing a sampling period.
In this method, although a filter constant can be changed freely, a microprocessor bears a large burden when handling a number of input signals, resulting in slower response of control. The response is the original object of the microprocessor.
Besides, as an example of a digital filter for ON/OFF signals, Japanese Patent Laid-Open No. 2000-89974 specification discloses xe2x80x9cDATA STORAGE/CONTROL CIRCUITxe2x80x9d, in which a shift register is provided as hardware and sampling is carried out according to the above-mentioned concept.
Further, for example, Japanese Patent Laid-Open No. 9-83301 specification discloses xe2x80x9cSWITCHED CAPACITOR FILTERxe2x80x9d, in which a digital filter uses a switched capacitor as a noise filter for a multichannel analog input signal.
In this case as well, when handling a number of analog input signals, a microprocessor bears a large burden, resulting in slower response of control. The response of control is the original object of the microprocessor.
Besides, Japanese Patent Laid-Open No. 8-305681 specification discloses xe2x80x9cMICROCOMPUTERxe2x80x9d, in which a resistance of an analog filter composed of a resistor and a capacitor is switched on multiple stages to change a filter constant.
Incidentally, the above conventional device is disadvantageous as in the following.
Namely, as described above, the conventional device is partially but is not fully miniaturized and standardized in an integral manner.
Particularly in case of miniaturizing and standardizing an input/output circuit of a microprocessor, it is not possible to avoid reduction in original control capability and response of the microprocessor.
In order to solve the above-mentioned problem, the first object of the present invention is to provide an on-vehicle electronic controller which reduces a burden of a microprocessor regarding processing input and output to improve its original control capability and response and which entirely miniaturizes and standardizes the controller by reducing an input filter in size.
Moreover, the second object of the present invention is to provide an on-vehicle electronic controller in which a control program and a control constant are changed for kinds of vehicles having different control specifications so as to readily standardize hardware in a more effective manner.
An on-vehicle electronic controller according to claim 1 is constituted by the microprocessor including the nonvolatile memory, in which a control program for a controlled vehicle, a control constant, and so on are written from the external tool, and the RAM memory for computing; the integrated circuit including the direct input interface circuits and the direct output interface circuits that are connected to the data bus of the microprocessor, the variable filter circuit having the indirect input interface circuits and the constant setting registers, and the communication control circuit; and the interactive serial communication circuits for transmitting a plurality of external input signals to the RAM memory, the signals being inputted via the indirect input interface circuits, and for transmitting filter constants stored in the nonvolatile memory to the constant setting registers of the variable filter circuit.
According to the above configuration, it is possible to considerably reduce the number of input/output pins of the microprocessor with a small size at low cost, and it is not necessary to use large capacitors with various capacities for an input filter. Thus, the input interface circuits can be miniaturized and standardized. Further, particularly since a control program for a controlled vehicle and a filter constant are set in the nonvolatile memory in a collective manner, standardization can be achieved with a high degree of freedom. Additionally, the variable filter is controlled in the integrated circuit. Hence, without increasing the burden of the microprocessor, miniaturization and standardization can be achieved by function sharing of the microprocessor and the integrated circuit.
In an on-vehicle electronic controller according to claim 2 of the present invention, some of the indirect input interface circuits are interface circuits for ON/OFF signals, each circuit being constituted by a low-resistance bleeder resistor acting as a load on an input switch, a noise filter composed of a high-resistance series resistor and a small capacitor, and a level-judging comparator having a hysteresis function; the variable filter circuit is constituted by an input deciding register, which is set when a plurality of consecutive level judging results being sampled and stored with a predetermined period are all YES, and which is reset when a plurality of consecutive level judging results are all NO, and a constant setting register for storing a value of at least one of the sampling period and the number of logic judging points for setting/resetting; the output of the input deciding register is transmitted to the RAM memory; and the value of at least one of the sampling period and the number of the logic judging points for setting/resetting is transmitted from the nonvolatile memory to the constant setting register.
According to the above configuration, high-frequency noise is removed by the noise filter and the level-judging comparator that are input interface circuits for ON/OFF signals. Thus, the two-stage variable filter can improve filter characteristics and reduce the burden of the variable filter.
In an on-vehicle electronic controller according to claim 3 of the present invention, some of the indirect input interface circuits are interface circuits for an analog signal, each circuit being composed of a noise filter including positive and negative clip diodes and a small capacitor, the variable filter circuit is constituted by a switched capacitor, which is periodically charged and discharged by a switch, and a constant setting register for storing a value of a charging/discharging period, the output of the switched capacitor is converted to a digital value via an A/D converter, the digital converted value is transmitted to the RAM memory, and a value of the charging/discharging period is transmitted from the nonvolatile memory to the constant setting register.
According to the above configuration, high-amplitude noise and high-frequency noise are removed by the clip diodes and the noise filter that are input interface circuits for an analog signal. Thus, the two-stage variable filter can improve filter characteristics and reduce the burden of the variable filter.
In an on-vehicle electronic controller according to claim 4 of the present invention, part of control output of the microprocessor is supplied to a latch memory which stores a transmitted control output signal via the interactive serial communication circuit, and then to an external load via an indirect output interface circuit connected to the output of the latch memory.
According to the above configuration, direct output terminals of the microprocessor can be reduced so as to further miniaturize the microprocessor at lower cost.
In an on-vehicle electronic controller according to claim 5 of the present invention, direct input and direct output supplied to the data bus of the microprocessor require fast response in an operation such as ignition control of an engine and control of fuel injection, and indirect input and indirect output communicated with the microprocessor via the interactive serial communication circuit are input signals of low-speed and low-frequency operations of a manual operation signal, a temperature sensor, a water temperature sensor and so on, or output signals of low-speed and low-frequency operations of auxiliary output, warning display output and so on.
According to the above configuration, even when response is delayed in serial communication, a serious problem does not occur on the entire control. Thus, it is possible to positively carry out noise protection for an input signal in a number of low-speed and low-frequency operations and to reduce the number of input/output terminals of the microprocessor to achieve miniaturization.
In an on-vehicle electronic controller according to claim 6 of the present invention, the microprocessor transmits a filter constant and a command of input information transmission request that follow a command of filter constant transmission guide to the integrated circuit via the interactive serial communication circuit, and the integrated circuit stores received filter constants in the constant setting registers and transmits indirect input signal information following a command of input information reply guide to the RAM memory via the interactive serial communication circuit and the microprocessor.
According to the above configuration, under the guide and instruction of the microprocessor for exercising entire control, the integrated circuit for processing indirect input can receive filter constants and reply input information in a passive manner. Thus, a hardware structure of the integrated circuit can be simplified with a small size at low cost.
In an on-vehicle electronic controller according to claim 7 of the present invention, the microprocessor transmits a filter constant following the command of filter constant transmission guide and indirect output information or input information transmission request that follows the command of output information transmission guide to the integrated circuit via the interactive serial communication circuit, and the integrated circuit stores received filter constants and indirect output information in the constant setting registers and the latch memory and transmits indirect input signal information following the command of input information reply guide to the RAM memory via the interactive serial communication circuit and the microprocessor.
According to the above configuration, under the guide and instruction of the microprocessor for exercising entire control, the integrated circuit for processing indirect input and output can receive filter constants and indirect output information and reply input information in a passive manner. Thus, even in the case of more kinds of transmitted and received data, the hardware structure of the integrated circuit can be simplified with a small size at low cost.
In an on-vehicle electronic controller according to claim 8 of the present invention, the microprocessor transmits address information following a command of specific input information transmission request to the integrated circuit via the interactive serial communication circuit, and the integrated circuit transmits indirect input information of a designated address following a command of specific input information reply guide to the RAM memory via the interactive communication circuit and the microprocessor.
According to the above configuration, the microprocessor can always obtain specific indirect input information. Thus, even when response is delayed in serial communication, it is possible to monitor the latest state of specific indirect input.
In an on-vehicle electronic controller according to claim 9 of the present invention, the microprocessor transmits address information and filter constants that follow a command of specific constant transmission guide to the integrated circuit via the interactive serial communication circuit, and the integrated circuit stores received filter constants in the constant setting register at a designated address.
According to the above configuration, even during the operation of the microprocessor, some filter constants can be changed and optimization control such as learning correction can be performed on a filter constant. Further, during the operation of the microprocessor, it is difficult to have time for transferring a number of filter constants in a collective manner. However, the above problem can be solved by transmitting only specific filter constants.